import time

latitude_array=[0,0,0,0]#纬度
longitude_array=[0,0,0,0]#经度

#处理无人机客户端发送过来的数据包，将浮点型变成整型的数组。
def float_to_int(data1, xrray):
  data1 = float(data1)
  xrray[0] = int(data1)
  decimal_part = str(round(data1 % 1, 6)).split('.')[1]
  decimal3_first_two = decimal_part[:2]
  decimal3_second_two = decimal_part[2:4]
  decimal3_last_two = decimal_part[4:]
  xrray[1] = int(decimal3_first_two)
  xrray[2] = int(decimal3_second_two)
  xrray[3] = int(decimal3_last_two)
  return xrray

